/* 设计图十1280px */
@media screen and (min-width: 1280px) {
  .container {
    width: 1280px !important;
  }
}

/* 清空bootstrap的padding */
.no-padding {
  padding: 0 !important;
}

/* 清除默认样式 */
ul {
  padding: 0;
  list-style: none;
}
a, a:hover {
  text-decoration: none;
  color: inherit;
}

/* header */
header.header {
  padding: 0;
  h1 {
    margin: 0;
    a {
      display: block;
      background-color: #3274a3;
      img {
        display: block;
        max-width: 100%;
        margin: 0 auto;
      }
      span {
        display: block;
        height: 50px;
        line-height: 50px;
        color: #fff;
        text-align: center;
        font-size: 18px;
      }
    }
  }
  nav {
    background-color: #eeeeee;
    ul {
      li {
        height: 50px;
        a {
          display: flex;
          align-items: center;
          width: 100%;
          height: 100%;
          padding-left: 40px;
          color: #666666;
          font-size: 16px;
          span {
            padding-left: 4px;
          }
        }
        &:hover {
          background-color: #fff;
          color: #333;
        }
      }
    }
  }
}
/* header结束 */
/* main */
main.main {
  padding-right: 5px;
  padding-top: 10px;
  /* 新闻部分 */
  .news {
    overflow: hidden;
    border-bottom: 1px solid #ccc;
    li {
      float: left;
      width: 25%;
      padding: 0 10px 10px 0;
      &:nth-child(1) {
        width: 50%;
        p {
          width: 100%;
          padding: 0 10px;
          font-size: 20px;
          line-height: 41px;
          -webkit-line-clamp: 1;
        }
      }
      a {
        position: relative;
        display: block;
        height: 0;
        width: 100%;
        padding-top: 100%;
        background-color: #eeeeee;
        img {
          position: absolute;
          top: 0;
          // left: 0;
          // right: 0;
          // bottom: 0;
          width: 100%;
        }
        p {
          /* 文字多行省略号 */
          // overflow: hidden;
          display: -webkit-box;
          -webkit-line-clamp: 2;
          // text-overflow: ellipsis;
          -webkit-box-orient: vertical;
          /* ↑ */
          position: absolute;
          margin: 0;
          bottom: 0;
          background-color: rgba(0, 0, 0, 0.7);
          color: #fff;
          font-size: 12px;
          padding: 4px 4px 0 10px;
        }
      }
    }
  }
  /* 推荐部分 */
  .recommend {
    .recommend-box {
      display: flex;
      border-bottom: 1px solid #ccc;
      .img-box {
        display: flex;
        align-self: center;
        padding-left: 0;
        // height: auto;
        // overflow-y: hidden;
        img {
          display: block;
          width: 80%;
          border-radius: 5px;
          // align-self: center;
        }
      }
    }
  }
}
/* main结束 */

/* aside */
aside.aside {
  a {
    display: block;
    width: 100%;
    img {
      width: 100%;
    }
    &:nth-child(2) {
      margin-top: 20px;
      padding: 0 30px;
      border: 1px solid #ccc;
      button {
        border-radius: 0;
      }
      p {
        font-size: 12px;
      }
    }
  }
}
/* aside结束 */

/* 响应式布局设置 */
/* 992px 以下 */
@media screen and (max-width: 991px) {
  header.header {
    nav {
      overflow: hidden;
      ul {
        li {
          float: left;
          width: 20%;
          background-color: #fff;
          a {
            display: flex;
            justify-content: center;
            padding: 0;
          }
        }
      }
    }
  }
  main {
    padding-top: 0 !important;
  }
  aside {
    margin-top: 10px;
  }
}
/* 768px以下 */
@media screen and (max-width: 767px) {
  body {
    min-width: 320px !important;
  }
  header {
    nav {
      a {
        font-size: 12px !important;
      }
    }
  }
  main.main {
    .news {
      li {
        width: 50%;
        a {
          padding-top: 50%;
          overflow: hidden;
          img {
            top: 50%;
            transform: translateY(-40%);
          }
        }
      }
      li:nth-child(1) {
        width: 100% !important;
      }
    }
    .recommend {
      .recommend-box {
        // margin-bottom: 10px;
        margin: 10px 0;
        .content {
          h3 {
            font-size: 16px;
            margin-top: 10px;
          }
        }
      }
    }
  }
  aside.aside {
    margin-bottom: 20px;
  }
}
/* 响应式布局设置结束 */